package com.example.xl.springboot01.users.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;
@Api(tags = "用户管理")
@Controller
public class HelloController {
    @ApiOperation(value = "用户列表")
    @RequestMapping(value="/hello",method = { RequestMethod.GET }, produces="application/json;charset=UTF-8")
    @ResponseBody
    public String index(HttpServletRequest req) {
        Object userName = req.getParameter("userName");
        Object password = req.getParameter("password");
        //TODO  userName && password
        //succcess.
        //fail

        return "<h1>Hello World:"+userName+"</h1>";
    }


}
